export default {
    /**
     * 响应成功
     * @param {*} data
     * @returns {{code: number, data: *, message: string}}
     */
    success(data) {
        return {
            code: 0,
            data: data,
            message: '成功',
        }
    },
    /**
     * 响应失败
     * @param {*} message
     * @param {number} code
     * @returns {{code: number, data: string, message: string}}
     */
    error(message = '失败', code = 1) {
        return {
            code: code,
            data: '',
            message: message,
        }
    },
}
